package service.impl;

import dao.PrinterDao;
import entity.sz.Printer;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import service.PrinterService;

/**
 * @author 胡小超
 * 2024/12/5 上午11:59
 */
@Service("PrinterService")
public class PrinterServiceImpl implements PrinterService {
    //打印机数据访问对象
    @Resource(name = "GrayPrinter")
    private PrinterDao printerDao;

    // 设置打印机数据访问对象 (DAO)
    @Override
    public void setPrinterDao(PrinterDao printerDao) {
        this.printerDao = printerDao;
    }

    // 打印方法，调用打印机数据访问对象 (DAO) 的 print 方法进行打印
    @Override
    public void print(Printer printer) {
        printerDao.print(printer);
    }
}
